//
//  TWFXSingleClass.h
//  单例类 ： 各种 URL 的构造方法、数据的读写扥功能
//
//  Created by Lion User on 13-9-30.
//  Copyright (c) 2013年 Lion User. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "TWFXStruct_AllWeatherInfo.h"


@interface TWFXSingleClass : NSObject

@property (nonatomic, assign) int indexOfCurrentCity;
@property (nonatomic, retain) TWFXStruct_AllWeatherInfo* currentCityInfo;
@property (nonatomic, retain) NSMutableArray* cityDataList;

@property (nonatomic, copy) NSString* AQI_Key;

@property (nonatomic, assign) BOOL isCityListInfosChangedToTrend;
@property (nonatomic, assign) BOOL isCityListInfosChangedToRealTime;


@property (nonatomic, assign) BOOL isCurrentCityChangedToTrend;
@property (nonatomic, assign) BOOL isCurrentCityChangedToRealTime;

@property (nonatomic, assign) BOOL isAddCity;


@property (nonatomic, readonly) NSString* notificationName_currentCityIsChangedToTrend;
@property (nonatomic, readonly) NSString* notificationName_currentCityIsChangedToRealTime;
@property (nonatomic, readonly) NSString* notificationName_currentCityIsReflesh;
@property (nonatomic, readonly) NSString* notificationName_CityDataListIsChanged;



-(void) initAPPData;

-(void) saveCurrentCityToUserDefault;
-(void) saveCityListToUserDefault;
-(void) saveIndexOfCurrentCityToUserDefault;

-(void) readCurrentCityFromUserDefault;
-(void) readCityListFromUserDefault;
-(void) readIndexOfCurrentCityFromUserDefault;

-(void) CurrentCitySynToCityList;
-(void) deletedCityIsCurrentCity : (int) index;


-(NSURL *) URL_futureWeather:(NSString*) countID;
-(NSURL *) URL_realTImeWeather:(NSString*) countID;
-(NSURL *) URL_AQI:(NSString*) countName;

-(void) changeKey;

+(TWFXSingleClass*) sharedTWFXSingleClass;

@end
